package com.shop.dao;

import com.shop.bean.Admin;
import com.shop.bean.User;
import com.shop.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminDao {
    Admin getAdminByUsername(@Param("username") String username);

    int adminRegister(@Param("admin") Admin admin);

    Admin getAdminByID(@Param("id") Integer id);

    int editAdmin(@Param("admin")Admin admin);

    int add(@Param("admin")Admin admin);

    int changePassword(@Param("id")Integer id,@Param("newpassword") String newpassword);


    int deleteAdmin(@Param("id")Integer id);

    int reloadPassword(@Param("id")Integer id,@Param("password")String password);

    int getCount(String text);

    List<Admin> selectAdmins(@Param("page") Page page, @Param("text") String text);
}
